% dsb3mean.m
% grabs and computes mean depth around
% drop point
% 3/28/01

clear
clf
stnloc=[-70.5290  -68.1014]; %B2 807m

% stnloc=[-70.9951  -68.2561]; % B3 449m
load q:\cruise\depthB2.dat
z=depthB2;

x=z(:,1);y=z(:,2);z=z(:,3);
m=find(z<10);
z(m)=[];x(m)=[];y(m)=[];

dLon=.05./60;
dLat=.05./60;
x1=stnloc(1)-dLon;
x2=stnloc(1)+dLon;
y1=stnloc(2)-dLat;
y2=stnloc(2)+dLat;

n=find(x>=x1 & x<=x2 & y>=y1 & y<=y2);
plot(x(n),y(n),'r*', stnloc(1),stnloc(2),'b*')
disp([mean(z(n))])
figure(2)
plot(z(n))